const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    tabbar: {
      type: Object,
      value: {
        "backgroundColor": "#ffffff",
        "color": "#979795",
        "selectedColor": "#1B7AFF",
        "list": [{
            "pagePath": "/pages/home/home",
            "text": "首页",
            "iconPath": "../../image/home1.png",
            "selectedIconPath": "../../image/home2.png"
          },
          {
            "pagePath": "/pages/publish/publish",
            "text": "发布",
            "iconPath": "../../image/publish1.png",
            "selectedIconPath": "../../image/publish2.png"
          },
          {
            "pagePath": "/pages/message/myMessage",
            "text": "消息",
            "iconPath": "../../image/message1.png",
            "selectedIconPath": "../../image/message2.png"
          },
          {
            "pagePath": "/pages/mine/mine",
            "text": "我的",
            "iconPath": "../../image/my1.png",
            "selectedIconPath": "../../image/my2.png"
          }
        ]
      }
    },
    unRead:{
      type: String,
      value:0
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onSwitchTab(e){
      wx.switchTab({
        url: e.currentTarget.dataset.url,
      })
    },

  }
})